package com.habdqn.attendance.web.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionBindingEvent;

/**
 * 用于启动定时任务的监听器
 *
 * @author Xing Jiejian 2019-10-22
 */
@WebListener()
public class TimerTaskListener implements ServletContextListener {

    public TimerTaskListener() {
    }

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        // TODO: 定时任务创建启动
        //1. 设定定时任务启动时间以及执行间隔时间
        //2. 构建定时任务对象，启动定时任务
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

    }
}
